{% extends "base.html" %}
{% block title %}
    个人考勤管理
{% endblock %}
{% block head %}
    <!-- Bootstrap Core CSS -->
    <link href="/static/lib/sb-admin/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/static/lib/sb-admin/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/static/lib/sb-admin/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/static/lib/sb-admin/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
{% endblock %}
{% block label %}
    <h1 class="page-header">个人考勤管理</h1>
{% endblock %}
{% block contenter %}
    <ul class="nav nav-pills">
        <li class="active"><a href="#kqjl" data-toggle="tab">考勤记录</a></li>
        <li><a href="#kqsq" data-toggle="tab">考勤申请</a></li>
    </ul>
    <div class="tab-content">
        <div id="kqjl" class="tab-pane fade in active">
            <table class="table">
                <thead>
                <tr>
                    <th>假条编号</th>
                    <th>假条状态</th>
                    <th>请假类型</th>
                    <th>请假原因</th>
                    <th>起始时间</th>
                    <th>结束时间</th>
                    <th>审核人</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for i in att_me %}
                    <tr>
                        <td class="col-lg-1">{{ i.id }}</td>
                        <td class="col-lg-1">{{ i.status }}</td>
                        <td class="col-lg-1">{{ i.type }}</td>
                        <td class="col-lg-3">{{ i.cause }}</td>
                        <td class="col-lg-2">{{ i.start_time }}</td>
                        <td class="col-lg-2">{{ i.end_time }}</td>
                        <td class="col-lg-2">{{ i.Examiners }}</td>
                        {% if i.status != '审核中' %}
                            <td class="col-lg-2"><a class="btn btn-default" href="#" disabled="true">撤销</a></td>
                        {% else %}
                            <td class="col-lg-2"><a class="btn btn-default" href="/oa_system/set_att/{{ i.id }}/?order=1" >撤销</a></td>
                        {% endif %}
                    </tr>
                {% endfor %}

                </tbody>
            </table>
        </div>
        <div id="kqsq" class="tab-pane fade in">
            <form method="post" action="/oa_system/attendance_me_add/">
                <input type="hidden" name="csrf_token"
                       value="{{ csrf_token() }}">
                <div class="form-group">
                    <label>原因:</label>
                    <textarea class="form-control" name="reason"></textarea>
                </div>
                <div class="form-group">
                    <label>类型:</label>
                    <select class="form-control" name="type">
                        <option value="事假">事假</option>
                        <option value="婚假">婚嫁</option>
                        <option value="产假">产假</option>
                        <option value="病假">病假</option>
                        <option value="年假">年假</option>
                        <option value="调休">调休</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>假期时长(天):</label>
                    <input class="form-control" type="text" name="day">
                </div>
                <div class="form-group">
                    <label>开始时间:</label>
                    <input class="form-control" type="text" name="start">
                </div>
                <div class="form-group">
                    <label>结束时间:</label>
                    <input class="form-control" type="text" name="end">
                </div>
                <div class="form-group">
                    <label>审核人:</label>
                    <select class="form-control" name="view">
                        {% for i in Viewers %}
                            <option value="{{ i.p_pe.P_name }}">{{ i.p_pe.P_name }}</option>
                        {% endfor %}
                    </select>

                </div>
                <div class="form-group">
                    <button class="btn btn-primary btn-block">提交</button>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
{% block body %}
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="/static/lib/sb-admin/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/static/lib/sb-admin/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/static/lib/sb-admin/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="/static/lib/sb-admin/dist/js/sb-admin-2.js"></script>
    #{% endblock %}
